package 手写filter;

/**
 *
 * 可以看到Filter可以在请求到达Servlet之前做处理，如
 * 1. 请求编码
 * 2. 敏感词过滤等
 *
 * @author chedx
 * @data 2021/3/21 3:05 PM
 */
public class TestMain {
    public static void main(String[] args) {
        ApplicationFilterChain applicationFilterChain = new ApplicationFilterChain();
        applicationFilterChain.addFilters(new LogFilter());
        applicationFilterChain.addFilters(new ImageFilter());
        applicationFilterChain.addServlet(new MyServlet());

        applicationFilterChain.doFilter();
    }
}
